home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
STRLEN.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-08-03
|
312b
|
28 lines
include compiler.inc
ttl STRLEN, 1.03, 08-03-86 clr
;string function - computes length of string
dseg
cseg
procdef strlen, <<dest, ptr>>
pushreg
ldptr di,dest
xor al,al
mov bx,di
mov cx,7fffh
cld
repnz scasb
dec di
mov ax,di
sub ax,bx
pret
pend strlen
finish